'use strict';

import Base from './base.js';

export default class extends Base {
  /**
   * index action
   * @return {Promise} []
   */

  init(http){
    super.init(http);
  }
  
  //后台主界面
  async indexAction(){
    //查询留言版数量
    let whereTotalGuest = {is_publish:1}
    //whereTotalGuest.readed = 0;
    let totalGuest = await this.model('guestbook').total(whereTotalGuest);

    this.assign({
        totalGuest:totalGuest
    });
    return this.display('admin/index/index');
  }

  //后台首页
  async indexV1Action(){
    return this.display();
  }
  
}